package com.jokesoft.feedback.core.service;

public class FeedBackDto {

    private final String name;
    private final String email;
    private final String feedBack;

    public FeedBackDto(String name, String email, String feedBack) {
        super();
        this.name = name;
        this.email = email;
        this.feedBack = feedBack;
    }

    public String getName() {
        return name;
    }

    public String getEmail() {
        return email;
    }

    public String getFeedBack() {
        return feedBack;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((email == null) ? 0 : email.hashCode());
        result = prime * result + ((feedBack == null) ? 0 : feedBack.hashCode());
        result = prime * result + ((name == null) ? 0 : name.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        FeedBackDto other = (FeedBackDto) obj;
        if (email == null) {
            if (other.email != null)
                return false;
        } else if (!email.equals(other.email))
            return false;
        if (feedBack == null) {
            if (other.feedBack != null)
                return false;
        } else if (!feedBack.equals(other.feedBack))
            return false;
        if (name == null) {
            if (other.name != null)
                return false;
        } else if (!name.equals(other.name))
            return false;
        return true;
    }

    @Override
    public String toString() {
        return "FeedBackDto [name=" + name + ", email=" + email + ", feedBack=" + feedBack + "]";
    }

}
